import request from "./request";

interface ILogin {
  account: string;
  password: string;
}

export const getLoginApi = (data: ILogin) => {
  return request.post("http://blogapi.shbwyz.com/login", data);
};

export const getListApi = () => {
  return request.get("http://blogapi.shbwyz.com/article/list");
};

export const getArticleApi = (id: number) =>
  request.get(`http://blogapi.shbwyz.com/article/${id}`);

export const getDeleteApi = (id: number) =>
  request.delete(`http://blogapi.shbwyz.com/article/${id}`);
